function fn(a, b) {
	console.log("a", a);
	console.log("b", b);
	console.log("this", this);
	return "hello";
}

Function.prototype.myBind = function (obj) {
    let args = [...arguments]
    args.shift()
    let self = this
    return function () {
        // 借助apply改变this指向
        return self.apply(obj, [...args]);
    }
};
// const res = fn.bind({ x: 10 }, 20, 30)()
const res = fn.myBind({ x: 10 }, 20, 30);
console.log("res", res());
